package com.bajiao.service.order;

import com.bajiao.entity.order.Order;
import com.bajiao.entity.order.OrderDetails;
import com.bajiao.vo.cart.CartResponse;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @Description: 订单详情表
 * @Author: FanJq
 * @Date:   2025-01-13
 * @Version: V1.0
 */
public interface OrderDetailsService extends IService<OrderDetails> {

    /**
     * @Description
     * 根据订单编号获取
     * @date 2025/1/13 18:44
     * @author FanJq
     * @param orderNo
     * @return {@link List< OrderDetails>}
    */
    List<OrderDetails> getByOrderNo(String orderNo);

    /**
     * @Description
     * 创建子订单
     * @date 2025/1/13 19:07
     * @author FanJq
     * @param order
     * @param cartList
     * @return {@link List< OrderDetails>}
    */
    List<OrderDetails> create(Order order, List<CartResponse> cartList);
}
